<div class="foot_menu">
    <ul>
        <li>
            <a class="menu <?php if($foot_menu=='notice'){?>on<?php }?>" href="javascript:;" val="<?php echo site_url('notice/index');?>" >
                <i class="ico ico_a" ></i>
                <p>通知</p>
            </a>
        </li>
        <li>
            <a class="menu <?php if($foot_menu=='kefu'){?>on<?php }?>" href="javascript:;" val="<?php echo site_url('member/kefu');?>" >
                <i class="ico ico_b"></i>
                <p>客服</p>
            </a>
        </li>
        <li class="home">
            <a href="<?php echo site_url('home/home');?>" <?php if($foot_menu=='home'){echo 'class="on"';}?> >
                <em><i class="ico ico_c"></i></em>
                <b></b>
            </a>
            <span></span>
        </li>
        <li>
            <a class="order <?php if($foot_menu=='order'){?>on<?php }?>" href="javascript:;" val="<?php echo site_url('order/order')?>" >
                <i class="ico ico_c"></i>
                <p>下单</p>
            </a>
        </li>
        <li>
            <a class="menu <?php if($foot_menu=='member'){?>on<?php }?>" href="javascript:;" val="<?php echo site_url('member/index');?>" >
                <i class="ico ico_d"></i>
                <p>我的</p>
            </a>
        </li>
    </ul>
</div>
<script>
    var has_adress = "<?php echo $has_adress;?>";
    var add_adress = "<?php echo site_url('member/addressadd');?>";
    var is_login = "<?php echo $is_login;?>";
    var login_url = "<?php echo site_url('home/login');?>";
    // 提交
    $(".order").on("click",function(){
        var url = $(this).attr("val");
        if(is_login == '0'){
            window.location.href = login_url;
            return false;
        }
        if(has_adress == '0'){
            layer.msg('请先添加默认收货地址哦！', {
                time: 1000, //1s后自动关闭
                shade: 0.1
            },function () {
                window.location.href = add_adress;
            });
            return false;
        }else{
            window.location.href = url;
        }

    });
    $(".menu").on("click",function(){
        var url = $(this).attr("val");
        if(is_login == '0'){
            window.location.href = login_url;
            return false;
        }else{
            window.location.href = url;
        }
    });
</script>